#include<iostream>
#include<fstream>
using namespace std;

void main()
{
	ifstream ifile("test.txt");
	char tempchar[100];
	int i=0;
	ifile.seekg(0,ios::beg);ifile.seekg(0,ios::end);
	long length=ifile.tellg();cout<<length<<endl;
	ifile.seekg(0,ios::beg);
	while(!ifile.eof())
	{
		ifile.getline(tempchar,100,'\n');
		cout<<tempchar<<endl;
	}
}